package com.qiqidream.admin.system.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qiqidream.admin.system.model.entity.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 系统管理-角色表  Mapper 接口
 * @author QiQiDream
 * @since 2019/11/18 10:53
 */
public interface RoleMapper extends BaseMapper<Role> {

    @Select("select code FROM sys_role WHERE json_contains(auth_json,#{menuId},'$.menu') =1")
    List<String> getRolesByMenuId(String menuId);
}
